home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!hpl3sn03.cern.ch
- From: Dan Pop <danpop@mail.cern.ch>
- Newsgroups: comp.lang.c
- Subject: Re: **** delay() function broken in Turbo C 2.0 ****
- Date: Mon, 22 Jan 1996 21:34:05 +0100
- Organization: CERN European Lab for Particle Physics
- Message-ID: <9601222034.AA19285@dxmint.cern.ch>
- References: <dkingma.96.000CE835@vt.edu>
- X-NNTP-Posting-Host: hpl3sn03.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
- X-Mail2News-Path: dxmint.cern.ch!hpl3sn03.cern.ch
-
- dkingma@vt.edu (Dave Kingma) writes:
-
- >I've put up with it long enough.. now I need an answer. I
- >have been using Borland's Turbo C v2.0 for years now, and
- >have problems with the delay() function.
-
- There is no such function in the standard C library.
-
- >The delay function
- >should be machine speed independent (put 1 ms in, get 1 ms
- >of delay).
-
- If you say so.
-
- >It works OK as long as the turbo switch is not
- >pressed on 486 machines.
-
- I couldn't find any reference to turbo switches and 486 machines in my
- ANSI C reference book.
-
- >Once you press the turbo switch,
- >all bets are off.
-
- Then don't press that bloody switch.
-
- >At that point, it's very dependent on
- >clock speed. Are there any patches that fix this? Borland
- >doesn't seem to want to offer free support on this product
- >and I don't see anything on their FTP site. Are there other
- >workarounds?
-
- 1. c.l.c is not for system/compiler specific topics. Go to
- comp.os.msdos.programmer with this kind of questions.
-
- 2. Learn how the 8254 timer/counter chip works and implement delay()
- yourself. It's fairly easy (but not trivial). The frequency of the
- input signal used by the channel responsible for the real time clock
- is 1.1925 MHz (whether the infamous turbo switch is pressed or not).
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-